var mysql = require('mysql'); //调用MySQL模块

//创建一个connection
var connection = mysql.createConnection({

    host: 'rm-wz9528134z6l2vyj3o.mysql.rds.aliyuncs.com', //主机
    user: 'haorui_data', //MySQL认证用户名
    password: 'haorui_data@123',
    port: '3306',
    database: 'haorui_calc'

});
//创建一个connection
connection.connect(function (err) {
    if (err) {
        console.log('[query] - :' + err);
        return;
    }
    console.log('[connection connect]  succeed!');
});
module.exports = connection